define(function(require) {
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
	var arrayBufferHelp = {
		str2ab : function(str){
			var buf = new ArrayBuffer(str.length);
			var bufView = new Uint8Array(buf);
			for(var i = 0,strLen=str.length; i < strLen; i++){
				bufView[i] = str.charCodeAt(i);
			}
			return buf;
				/*var buf = new ArrayBuffer(8);
				var bufView = new Uint8Array(buf);
				bufView[0] = 1;
				bufView[1] = 3;
				bufView[2] = 0;
				bufView[3] = 0;
				bufView[4] = 0;
				bufView[5] = 10;
				bufView[6] = 55;
				bufView[7] = 55;
				return buf;*/
		},
		ab2array : function(ab){
			var buf = new Uint8Array(ab);
			return Array.from(buf);
		},
	};
	return arrayBufferHelp;
});